package com.cro.prison.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cro.prison.entity.pojo.Track;
import com.cro.prison.entity.pojo.User;
import com.cro.prison.entity.vo.TrackNameVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TrackDao extends BaseMapper<Track> {

    @Select( "SELECT p.name value,t.prisoner_id id FROM `track` t LEFT JOIN prisoner p ON t.prisoner_id = p.id;")
    public List<TrackNameVo> getTrackNames();
}
